package com.exchange;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.exchange.context.EnableUserInfoTransmitter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;

/***
 *                    .::::.
 *                  .::::::::.
 *                 :::::::::::
 *             ..:::::::::::'
 *           '::::::::::::'
 *             .::::::::::
 *        '::::::::::::::..
 *             ..::::::::::::.
 *           ``::::::::::::::::
 *            ::::``:::::::::'        .:::.
 *           ::::'   ':::::'       .::::::::.
 *         .::::'      ::::     .:::::::'::::.
 *        .:::'       :::::  .:::::::::' ':::::.
 *       .::'        :::::.:::::::::'      ':::::.
 *      .::'         ::::::::::::::'         ``::::.
 *  ...:::           ::::::::::::'              ``::.
 * ```` ':.          ':::::::::'                  ::::..
 *                    '.:::::'                    ':'````..
 *
 * @Author liuhai
 * @Date 2020-11-11 17:24:44
 * @Description 系统管理服务
 * @EnableDiscoveryClient  nocas服务发现注解
 * @EnableUserInfoTransmitter 获取用户上下文信息 ，如果使用需在请求头添加参数，
 *      参数名称参照配置文件的配置参数：params.redis.user_token_key，值为用户登陆的 token 值
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableUserInfoTransmitter
public class KettleApplication {

    public static void main(String[] args) {
        SpringApplication.run(KettleApplication.class, args);
    }

    /**
     * MP分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
